]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Remove needless function
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 14 Feb 2018 11:46:48 +0000 (12:46 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 15 Feb 2018 18:36:29 +0000 (19:36 +0100)
It boils down to another function call, and has a single caller. Just let
the caller make _setActiveLayer() directly.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46

js/ui/keyboard.js

index 2701669975e3d396c1f2531e6e584b5e11d10696..ad973685da9dec93e2bd7557b4e8967d6d2d6adc 100644 (file)
@@ -813,7 +813,7 @@ var Keyboard = new Lang.Class({
             }));
             extraButton.connect('released', Lang.bind(this, function() {
                 if (switchToLevel != null)
-                    this._onLevelChanged(switchToLevel);
+                    this._setActiveLayer(switchToLevel);
                 else if (keyval != null)
                     this._keyboardController.keyvalRelease(keyval);
                 else if (action == 'hide')
@@ -902,10 +902,6 @@ var Keyboard = new Lang.Class({
         this.actor.height = maxHeight;
     },
 
-    _onLevelChanged: function (level) {
-        this._setActiveLayer(level);
-    },
-
     _onGroupChanged: function () {
         this._ensureKeysForGroup(this._keyboardController.getCurrentGroup());
         this._setActiveLayer(0);